package com.vcc.data.entity;


import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Table;
import com.vcc.data.base.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 钱包
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Setter
@Getter
@Table(value = "vcc_wallet")
public class Wallet extends BaseEntity implements Serializable {

    /**
     * 用户
     */
    @Column(comment = "用户ID", value = "user_id")
    private Long userId;

    /**
     * 币种
     */
    @Column(comment = "币种ID", value = "currency_id")
    private Long currencyId;

    /**
     * 币种
     */
    @Column(comment = "币种编码", value = "currency_code")
    private String currencyCode;

    /**
     * 可用额度
     */
    @Column(comment = "可用额度", value = "usable_quota")
    private BigDecimal usableQuota;

    /**
     * 充值额度
     */
    @Column(comment = "充值额度", value = "recharge_quota")
    private BigDecimal rechargeQuota;

    /**
     * 消费额度
     */
    @Column(comment = "消费额度", value = "consumption_quota")
    private BigDecimal consumptionQuota;

    /**
     * 充值点数
     */
    @Column(comment = "充值点数", value = "exchange_rate", ignore = true)
    private BigDecimal exchangeRate;

    /**
     * 充值点数
     */
    @Column(comment = "提现点数", value = "withdraw_rate", ignore = true)
    private BigDecimal withdrawRate;

    /**
     * 版本号
     */
    @Column(comment = "版本号", value = "version")
    private Long version;


    public Wallet() {
    }

    public Wallet(Long userId,
                  Long currencyId,
                  String currencyCode,
                  BigDecimal usableQuota,
                  BigDecimal rechargeQuota,
                  BigDecimal consumptionQuota,
                  BigDecimal exchangeRate,
                  Long version) {
        this.userId = userId;
        this.currencyId = currencyId;
        this.currencyCode = currencyCode;
        this.usableQuota = usableQuota;
        this.rechargeQuota = rechargeQuota;
        this.consumptionQuota = consumptionQuota;
        this.exchangeRate = exchangeRate;
        this.version = version;

    }

}
